﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserModify.aspx.cs" Inherits="Systems_UserModify" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Styles/style.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery132min.js" type="text/javascript"></script>
    <script src="../Scripts/validform.js" type="text/javascript"></script>
    <script src="../Scripts/YJPopup.js" type="text/javascript"></script>
    <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        var MyPopup;
        $(document).ready(function () {
            MyPopup = new YJPopup({
                contentDivID: "YJContentDiv",
                dragBarDivID: "YJDragBar",
                dragable: false,
                autoCreate: true,
                Y: 55
            });
            $.checkForm();

            $("input[id$='txtMobile']").bind("input propertychange", function () {
                var val = $(this).val();
                var uid = $(":input[id$='HidUserID']").val();
                if (val.length == 11) {
                    $.ajax({
                        type: "post",
                        url: '<%=ResolveClientUrl("~/Ashx/system.ashx") %>?action=checkUser&uname=' + val + '&uid=' + uid + '&k=' + Math.random(),
                        error: function () {
                            $("#checkResult").html('验证出错');
                            $(":input[id$='btnSave']").attr('class', 'btn-disabled');
                            $(":input[id$='btnSave']").attr("disabled", "disabled");
                        },
                        success: function (data) {
                            var obj = eval("(" + data + ")").result;
                            if (obj.r == "suc") {
                                $("#checkResult").html('');
                                $(":input[id$='btnSave']").attr('class', 'btn');
                                $(":input[id$='btnSave']").removeAttr('disabled');
                            } else {
                                $("#checkResult").html(obj.val);
                                $(":input[id$='btnSave']").attr('class', 'btn-disabled');
                                $(":input[id$='btnSave']").attr("disabled", "disabled");
                            }
                        },
                        complete: function () {
                        }
                    });
                }
                else {
                    $("#checkResult").html('请填写手机号');
                    $(":input[id$='btnSave']").attr('class', 'btn-disabled');
                    $(":input[id$='btnSave']").attr("disabled", "disabled");
                }
            });
        });
        function ClosePopup() {
            MyPopup.Hide();
        }
    </script>
    <style type="text/css">
        .photocontainer
        {
            margin-top: 10px;
            background: url("../images/bg_120.gif") no-repeat left top;
            padding: 7px 12px 12px 7px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="0" width="100%" cellpadding="4">
            <tr>
                <td align="right" style="width: 80px">
                    用户名：
                </td>
                <td>
                    <NC:FTextBox ID="txtMobile" runat="server" Width="150px" placeholder="手机号" CheckGroup="Add"
                        CheckType="PhoneNumber"></NC:FTextBox>
                    <span id="checkResult" class="tip"></span>
                    <asp:HiddenField ID="HidUserID" runat="server" Value="0" />
                </td>
                <td align="right" style="width: 80px">
                    姓名：
                </td>
                <td>
                    <NC:FTextBox ID="txtTrueName" runat="server" Width="150px" CheckGroup="Add"></NC:FTextBox>
                </td>
                <td align="right">
                    性别：
                </td>
                <td>
                    <NC:FDropdownList ID="ddlSex" runat="server" Width="155px" CheckGroup="Add">
                        <asp:ListItem Selected="True">男</asp:ListItem>
                        <asp:ListItem>女</asp:ListItem>
                    </NC:FDropdownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    微信号：
                </td>
                <td align="left">
                    <NC:FTextBox ID="txtWeChat" runat="server" Width="150px" CheckGroup="Add" EnableNull="true"></NC:FTextBox>
                </td>
                <td align="right">
                    身份证：
                </td>
                <td align="left">
                    <NC:FTextBox ID="txtCardNumber" runat="server" CheckGroup="Add" CheckType="IDCard"
                        EnableNull="true" Width="150px"></NC:FTextBox>
                </td>
                <td align="right">
                    出生日期：
                </td>
                <td>
                    <NC:FTextBox ID="txtBirthday" runat="server" Width="150px" CheckGroup="Add" CheckType="DateTime"
                        onclick="WdatePicker()"></NC:FTextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    排序：
                </td>
                <td align="left">
                    <NC:FTextBox ID="txtPaiXu" runat="server" Width="150px" CheckGroup="Add" CheckType="Int">0</NC:FTextBox>
                </td>
                <td align="right">
                    岗位：
                </td>
                <td align="left">
                    <asp:Label ID="labUserRole" runat="server"></asp:Label>
                </td>
                <td align="right">
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="6" align="center">
                    <asp:Button ID="btnSave" runat="server" class="btn btn3" Text="保 存" CheckGroup="Add"
                        OnClick="btnSave_Click" />
                    &nbsp;<asp:Label ID="LabErr" runat="server" Style="color: #FF0000"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
